Skip to content

Homelab OIDC login button + auto-provision org on first sign-in#7

Merged
ndemarco merged 1 commit intomainfrom
logo-integration
Apr 20, 2026
Merged

Homelab OIDC login button + auto-provision org on first sign-in#7
ndemarco merged 1 commit intomainfrom
logo-integration

Conversation

@ndemarco
Copy link
Copy Markdown
Owner

Summary

  • Add "Sign in with Homelab IdP" button to /login, shown only when AUTH_HOMELAB_ISSUER, AUTH_HOMELAB_CLIENT_ID, and AUTH_HOMELAB_CLIENT_SECRET are all set
  • Force dynamic rendering on the login page so runtime-injected container env vars are read at request time, not baked in at build
  • Add signIn callback that auto-provisions a default org + owner membership for any user with no existing org (covers all providers: credentials, OIDC, dev-impersonate)

Test plan

  • Set AUTH_HOMELAB_* env vars in staging container and confirm button appears on /login
  • Confirm button is absent when vars are unset (e.g. local dev without vars)
  • Sign in via Homelab IdP — confirm org is created and app loads without 401
  • Sign in a second time — confirm no duplicate org is created
  • Dev-impersonate a new email — confirm org is provisioned on first use

🤖 Generated with Claude Code

Login page: show "Sign in with Homelab IdP" button when all three
AUTH_HOMELAB_* env vars are present. Force dynamic rendering so
process.env is evaluated at request time, not baked in at build.

Auth config: signIn callback creates a default org + owner membership
for any user who has no org yet, covering all providers (credentials,
OIDC, dev-impersonate).
@ndemarco ndemarco merged commit 5882705 into main Apr 20, 2026
3 checks passed
@ndemarco ndemarco deleted the logo-integration branch April 20, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant